package com.syz.mall.mapper;

import com.syz.mall.pojo.User;
import com.syz.mall.pojo.UserOtherData;
import com.syz.mall.pojo.query.UserQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface UserMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(User record);

    int insertSelective(User record);

    User selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(User record);

    int updateByPrimaryKey(User record);

    User selectByUsernameUser(String username);
    User login(@Param("username") String username, @Param("password") String password);

    User managerLogin(@Param("username") String username, @Param("password") String password);

    List<User> selectAll(UserQuery userQuery);

    Integer queryIdByUsername(String username);

    UserOtherData selectOtherDataByAnswer(@Param("id")Integer id,@Param("answer") String answer);

}